package com.cy.myblog.util;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

/**
 * 这是邮件密码验证器
 * Created by Administrator on 2015/6/18.
 */
public class MyAuthenticator extends Authenticator {
    private String username = null;
    private String password = null;

    public MyAuthenticator(String user,String pass){
        this.username = user;
        this.password = pass;
    }

    protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(username, password);
    }
}
